#include "Connection.hpp"

Connection::Connection(int fd, const char *addr, struct ev_loop *loop)
{
	client_fd = fd;
	client_loop = loop;
}

void Connection::start()
{
	w_client.set(cl_cb);
	w_client.set(client_loop);
	w_client.start(client_fd, ev::READ);
}

Connection::~Connection()
{
	w_client.stop();
	close(client_fd);
}

